﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Sector7.Medical.EntityType;
using Sector7.Framework.Core;
using Sector7.Medical.Enums;

namespace Sector7.Medical.Services
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“ISystemService”。
    [ServiceContract]
    public interface ISystemService
    {
        #region /// Seed

        /// <summary>
        /// 获取一元流水号
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        [OperationContract]
        int GetUnarySeed(string arg1);

        /// <summary>
        /// 获取二元流水号
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="arg1"></param>
        /// <returns></returns>
        [OperationContract]
        int GetBinarySeed(string arg1, string arg2);

        /// <summary>
        /// 获取三元流水号
        /// </summary>
        /// <param name="tableName"></param>
        /// <param name="arg1"></param>
        /// <param name="arg2"></param>
        /// <returns></returns>
        [OperationContract]
        int GetTernarySeed(string arg1, string arg2, string arg3);

        #endregion

        #region /// Username and Password

        /// <summary>
        /// 根据姓名生成用户名
        /// </summary>
        /// <param name="fullName"></param>
        /// <returns></returns>
        [OperationContract]
        string GetUsername(string fullName);

        /// <summary>
        /// 系统登录
        /// </summary>
        /// <param name="username">用户名</param>
        /// <param name="password">密码</param>
        /// <param name="accessRole">角色类型</param>
        /// <returns>返回用户唯一标识符或错误码</returns>
        [OperationContract]
        string Login(string username, string password, AccessRoleType accessRole);

        #endregion
    }
}
